Option Summary

Contents|Index|Previous|Next
Option summary

What follows is a summary of all the options, grouped by type.

If the description for a particular option does not mention a source language, you can use that option with all supported languages.

The `gcc` program accepts options and filenames as operands. Many options have multi-letter names; therefore, multiple single-letter options may not be grouped. You can mix options and other arguments. Order does matter when you use several options of the same kind; for example, if you specify ‘`-L`’ more than once, the directories are searched in the order specified.

Many options have long names starting with ‘`-f`’ or with ‘`-W`’ (for example, ‘`-fstrength-reduce`’ or ‘`-Wformat`’). Names often have positive and negative forms (the negative form of ‘`-ffoo`’ would be ‘`-fno-foo`’); this documentation generally discusses only one of the forms, whichever one not being default.

For each list of options, see the corresponding documentation for more details.

- Options controlling the kind of output
- Compiling C programs
- Options controlling C dialect
- Options that control C++ dialect
- Options to request or suppresss warnings
- Options for debugging your program or GNU CC
- Options that control optimization
- Options controlling the preprocessor
- Passing options tothe assembler
- Options for linking
- Options for directory search
- Specifying target machine and compiler version
- Hardware models and configurations

- AMD29K options
- ARC options
- ARM options
- ARM Thumb options
- Clipper options
- Convex options
- DEC Alpha options
- Hitachi H8/300 options
- Hitachi SH options
- HPPA options
- IBM PowerPC options
- IBM RS/6000 options
- IBM RT options
- Intel `x`86 options
- Intel 960 options
- Matsushita MN10200 options
- Matsushita MN10300 options
- MIPS options
- Mitsubishi D10V options
- Mitsubishi M32R/D/X options
- Motorola 68K options
- Motorola 88K options
- NEC V850 options
- SPARC options
- System V options
- VAX options
- Zilog options

- Options for code generation conventions
- The offset-info option

## Overall options

See Options controlling the kind of output.

-c -S -E -o file -pipe -v -x language

## C Language options

See Options controlling C dialect.

-ansi -flagng-isoc9x -fallow-single-precision -fcond-mismatch -fno-asm -fno-builtin -ffreestanding -fhosted -fsigned-bitfields -fsigned-char -funsigned-bitfields -funsigned-char -fwritable-strings -traditional -traditional-cpp -trigraphs

## C++ Language options

See Options that control C++ dialect.

-fno-access-control -fall-virtual -fdollars-in-identifiers -felide-constructors -fenum-int-equiv -fexternal-templates -ffor-scope -fno-for-scope -fhandle-signatures -fmemoize-lookups -fname-mangling-version-n -fno-default-inline -fno-gnu-keywords -fnonnull-objects -fguiding-decls -foperator-names -fstrict-prototype -fthis-is-variable -ftemplate-depth-n -nostdinc++ -traditional

# Warning options

See Options to request or suppress warnings.

-fsyntax-only -pedantic -pedantic-errors -w -W -Wall -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscript –Wcomment -Wconversion -Werror -Wformat -Wid-clash-len -Wimplicit -Wimplicit-int -Wimplicit-function-declarations -Wimport -Winline -Wlarger-than-len -Wmain -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wno-import -Wold-style-cast -Woverloaded-virtual -Wparentheses -Wpointer-arith -Wredundant-decls -Wreorder -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch –Wsynth -Wtemplate-debugging -Wtraditional –Wtrigraphs -Wundef -Wuninitialized -Wunused -Wwrite-strings -Wunknown-pragmas

# Debugging options

See Options for debugging your program or GCC.

-a -ax -dletters -fpretend-float -fprofile-arcs -ftest-coverage -g -glevel -gcoff -gdwarf -gdwarf-1 -gdwarf+1 -gdwarf-2 -ggdb -gstabs -gstabs+ -gxcoff -gxcoff+ -p -pg -print-file-name=library -print-libgcc-file-name -print-prog-name=program -print-search-dirs -save-temps

## Optimization options

See Options that control optimization.

-fbranch-probabilities -fcaller-saves -fcse-follow-jumps -fcse-skip-blocks -fdelayed-branch -fexpensive-optimizations -ffast-math -ffloat-store -fforce-addr -fforce-mem -ffunction-sections -finline-functions -fkeep-inline-functions -fno-default-inline -fno-defer-pop -fno-function-cse -fno-inline -fno-peephole -fomit-frame-pointer -fregmove -frerun-cse-after-loop -frerun-loop-opt -fschedule-insns -fschedule-insns2 -fshorten-lifetimes -fstrength-reduce -fthread-jumps -funroll-all-loops -funroll-loops -fgcse -fmove-all-variables -freduce-all-givs -O -O0 -O1 -O2 -O3 Os

## Preprocessor options

See Options controlling the preprocessor.

-Aquestion(answer) -C -dD -dM -dN -Dmacro[=defn]
-E -H -idirafter dir -include file -imacros file
-iprefix file -iwithprefix dir -iwithprefixbefore dir
-isystem dir -M -MD -MM -MMD -MG -nostdinc -P
-trigraphs -undef -Umacro -Wp, option

## Assembler option

See Passing options to the assembler.

-Wa, option

## Linker options

See Options for linking.

object-file-name -llibrary
-nostartfiles -nodefaultlibs -nostdlib
-s -static -shared -symbolic
-Wl,option -Xlinker option
-u symbol

## Directory options

See Options for directory search.

-Bprefix -Idir -I- -Ldir -specs=file

## Target options

See Specifying target machine and compiler version.

-bmachine -Vversion

## Machine dependent options

See Hardware models and configurations.

AMD29K options (see AMD29K options)

-m29000 -m29050 -mbw -mnbw -mdw -mndw -mlarge -mnormal -msmall -mkernel-registers -mno-reuse-arg-regs -mno-stack-check -mno-storem-bug -mreuse-arg-regs -msoft-float -mstack-check -mstorem-bug -muser-registers

ARC options (see ARC options)

-EB –EL –mmangle-cpu–mcpu=cpu –mtext=text section
–mdata=data section –mrodata=readonly data section

ARM options (see ARM options)

-mapcs-frame -mno-apcs-frame -mapcs-26 -mapcs-32 -mapcs-stack-check -mno-apcs-stack-check -mapcs-float -mno-apcs-float -mapcs-reentrant -mno-apcs-reentrant-msched-prolog -mno-sched-prolog -mlittle-endian -mbig-endian -mwords-little-endian -mshort-load-bytes -mno-short-load-bytes -mshort-load-words -mno-short-load -msoft-float -mhard-float -mfpe -mthumb-interwork -mno-thumb-interwork -mcpu= -march= -mfpe= -mstructure-size-boundary= -mbsd -mxopen -mno-symrename -mnop-fun-dllimport -mno-nop-fun-dllimport

ARM Thumb options (see ARM Thumb options)

-mtpcs-frame -mno-tpcs-frame -mtpcs-leaf-frame -mno-tpcs-leaf-frame -mlittle-endian -mbig-endian -mthumb-interwork -mno-thumb-interwork -mstructure-size-boundary= -mnop-fun-dllimport -mno-nop-fun-dllimport -mcallee-super-interworking -m-callee-super-interworking -mcaller-super-interworking -mno-caller-super-interworking

Clipper options (see Clipper options)

-mc300 -mc400

Convex options (see Convex options)

-mc1 -mc2 -mc32 -mc34 -mc38 -margcount -mnoargcount
-mlong32 -mlong64 -mvolatile-cache -mvolatile-nocache

DEC Alpha options (see DEC Alpha options)

-mfp-regs -mno-fp-regs -mno-soft-float -msoft-float -malpha-as -mgas -mieee -mieee-with-inexact -mieee-conformant -mfp-trap--mode=mode -mfp-rounding-mode=mode -mtrap-precision=mode -mbuild-constants -mcpu=cpu type -mbwx -mno-bwx -mcix -mno-cix -mmax -mno-max -mmemory-latency=time

Hitachi H8/300 options (see H8/300 options)

-mrelax -mh -ms -mint32 -malign-300

Hitachi SH options (see SH options)

-m1 -m2 -m3 -mb -ml -mrelax

HPPA options (see HPPA options)

-mbig-switch -mdisable-fpregs -mdisable-indexing -mfast-indirect-calls -mgas -mjump-in-delay -mlong-load-store –mno-big-switch -mno-disable-fpregs -mno-disable-indexing -mfast-indirect-calls -mno-gas -mno-jump-in-delay -mno-long-load-store -mno-portable-runtime -mno-soft-float -mno-space -mno-space-regs -msoft-float -mpa-risc-1-0 -mpa-risc-1-1 -mportable-runtime -mschedule=list -mspace -mspace-regs

IBM RS/6000 and PowerPC 0ptions (see IBM RS/6000 and PowerPC options)

-mcpu=cpu type -mtune=cputype -mpower -mno-power -mpower2 -mno-power2 -mpowerpc -mno-powerpc -mpowerpc-gpopt -mno-powerpc-gpopt -mpowerpc-gfxopt -mno-powerpc-gfxopt -mnew-mnemonics -mno-new-mnemonics -mfull-toc -mminimal-toc -mno-fop-in-toc -mno-sum-in-toc -mxl-call -mno-xl-call -mthreads -mpe -msoft-float -mhard-float -mmultiple -mno-multiple -mstring -mno-string -mupdate -mno-update -mfused-madd -mno-fused-madd -mbit-align -mno-bit-align -mstrict-align -mno-strict-align –mrelocatable -mno-relocatable -mrelocatable-lib -mno-relocatable-lib -mtoc -mno-toc -mtraceback -mno-traceback -mlittle -mlittle-endian -mbig -mbig-endian -mcall-aix -mcall-sysv -mprototype -mno-prototype -msim -mmvme -memb –mads –myellowknife -msdata -msdata=opt -G num

IBM RT options (see IBM RT options)

-mcall-lib-mul -mfp-arg-in-fpregs -mfp-arg-in-gregs
-mfull-fp-blocks -mhc-struct-return -min-line-mul
-mminimum-fp-blocks -mnohc-struct-return

Intel 386 options (see Intel 386 options)

-mcpu=cpu type -march=cpu type -mieee-fp -mno-fancy-math-387 -mno-fp-ret-in-387 -msoft-float -msvr3-shlib -mno-wide-multiply -mrtd -malign-double
-mreg-alloc=list -mregparm=num -malign-jumps=num
-malign-loops=num -malign-functions=num

Intel 960 options (see Intel 960 options)

-mcpu type -masm-compat -mclean-linkage -mcode-align -mcomplex-addr -mleaf-procedures -mic-compat -mic2.0-compat -mic3.0-compat -mintel-asm -mno-clean-linkage -mno-code-align -mno-complex-addr -mno-leaf-procedures -mno-old-align -mno-strict-align -mno-tail-call -mnumerics -mold-align -msoft-float -mstrict-align -mtail-call

Matsushita MN10300 options (see MN10200 options)

-mrelax

Matsushita MN10300 options (see MN10300 options)

-mmult-bug -mno-mult-bug -mrelax

MIPS options (see MIPS options)

-mabicalls -mcpu=cpu type -membedded-data -membedded-pic -mfp32 -mfp64 -mgas -mgp32 -mgp64 -mgpopt -mhalf-pic -mhard-float -mint64 -mips1 -mips2 -mips3 -mlong64 -mlong-calls -mmemcpy -mmips-as -mmips-tfile -mno-abicalls -mno-embedded-data -mno-embedded-pic -mno-gpopt -mno-long-calls -mno-memcpy -mno-mips-tfile -mno-rnames -mno-stats -mrnames -msoft-float -m4650 -msingle-float -mmad -mstats -EL -EB -G num -nocpp

Mitsubishi D10V options (see D10V options)

-mint16 -mint32 -maddac3 -mno-addac3 -mdouble32 -mdouble64 -maccum -mno-accum -msim -masm-optimize -mno-asm-optimize -msmall-insns -mno-small-insns -mbranch-cost=n -mcond-exec=n -mno-cond-move -mcond-move

Mitsubishi M32R/D/X options (see M32R/D/X options)

-mcode-model=small -mcode-model=medium -mcode-model=large -msdata=none –msdata=sdata –msdata=use –G num

Motorola 68K options (see M68K options)

-m68000 -m68020 -m68020-40 –m68020-60 -m68030 -m68040 -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 -mnobitfield -mrtd -mshort -msoft-float –malign-int

Motorola 88K options (see M88K options)

-m88000 -m88100 -m88110 -mbig-pic -mcheck-zero-division -mhandle-large-shift -midentify-revision -mno-check-zero-division -mno-ocs-debug-info -mno-ocs-frame-position -mno-optimize-arg-area -mno-serialize-volatile -mno-underscores -mocs-debug-info -mocs-frame-position -moptimize-arg-area -mserialize-volatile -mshort-data-num -msvr3 -msvr4 -mtrap-large-shift -muse-div-instruction -mversion-03.00 -mwarn-passed-structs

NEC V850 options (see NEC V850 options)

`-mlong-calls -mno-long-calls -mep -mno-ep -mprolog-function -mno-prolog-function -mspace -mtda=n -msda=n -mzda=n -mv850 -mbig-switch -mapp-regs -mno-app-regs`

SPARC options (see SPARC options)

-mcpu=cpu type -mtune=cpu type -mcmodel=code model -malign-jumps=num -malign-loops=num -malign-functions=num -m32 -m64 -mapp-regs -mno-app-regs -mbroken-saverestore -mcypress -mepilogue -mno-epilogue -mflat -mno-flat -mfpu -hmno-fpu -mhard-float -mhard-quad-float -mimpure-text -mliveg0 -mno-impure-text -mno-stack-bias -mno-unaligned-doubles -msoft-float -msoft-quad-float -msparclite -mstack-bias -msupersparc -munaligned-doubles -mv8

System V options (see System V options)

-Qy -Qn -YP,paths -Ym,dir

VAX options (see VAX options)

-mg -mgnu -munix

Zilog option

> `-mz8001`
> Generate code for the segmented variant of the Z8000 architecture. (Without this option, `gcc` generates unsegmented Z8000 code suitable, for example, for the Z8002.)

## Code generation options

See Options for code generation conventions.

-fcall-saved-reg -fcall-used-reg -fexceptions -ffixed-reg -finhibit-size-directive –fcheck-memory-usage -fprefix-function-name -fno-common -fno-ident -fno-gnu-linker -fpcc-struct-return -fpic -fPIC -freg-struct-return -fshared-data -fshort-enums -fshort-double –fvolatile -fvolatile-global -funaligned-pointers -funaligned-struct-hack -fverbose-asm -fpack-struct –fstack-check +e0 +e1 -fargument-alias -fargument-noalias -fargument-noalias-global

Top|Contents|Index|Previous|Next